﻿using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using System;
using Microsoft.Extensions.DependencyInjection;

[assembly: HostingStartup(typeof(Repository.RepositoryHostingStartup))]
namespace Repository
{
    /// <summary>
    /// 可以在其它的程序集中配置WebHostBuilder
    /// </summary>
    public class RepositoryHostingStartup : IHostingStartup
    {
       
        public void Configure(IWebHostBuilder builder)
        {
            // 在服务中增加UserRepository数据库访问类
            builder.ConfigureServices(service =>
            {
                service.AddScoped<UserRepository>();
            });

            Console.WriteLine("RepositoryHostingStartup#Configure[DbTest]");
        }
    }
}
